package test.spring;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public final class Foo {

	public static void main(String[] args) {
		ApplicationContext ctx = new ClassPathXmlApplicationContext("beans.xml");
		A a = (A) ctx.getBean("a");
		a.sayHello();

		B b = (B) ctx.getBean("b");
		b.sayHi();
	}

}